var bcrypt = require('bcryptjs');
exports.bcryption = function(psw){
  var salt = bcrypt.genSaltSync(10);
  var hash = bcrypt.hashSync(psw, salt);
  return hash;
}


exports.decodebcrypt = function(psw,hash){
  let flag = bcrypt.compareSync(psw,hash);
  return flag;
}